package com.xyy.saas.payment.settle.core.service;

import com.xyy.saas.payment.common.exception.PaymentException;
import com.xyy.saas.payment.cores.bo.UserBo;
import com.xyy.saas.payment.cores.vo.ResultVO;
import com.xyy.saas.payment.dao.model.ThirdUserInfo;
import com.xyy.saas.payment.merchant.core.dto.MerchantCardBindDto;
import com.xyy.saas.payment.merchant.core.dto.PersonalCardBindDto;
import com.xyy.saas.payment.merchant.core.vo.*;
import com.xyy.saas.payment.payment.core.dto.ActiveCodeDto;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @Author: wuqiongda
 * @Date: 2019/10/22 14:25
 */
public interface AccountService {

    /**
     * 创建账户
     * @param accountDto
     * @return
     */
    public ResultVO createAccount(AccountDto accountDto);
    /**
     * 提交证件照片
     * @param userDto
     * @param idType
     * @return
     * @throws Exception
     */
    public ResultVO uploadPic(UserDto userDto, String idType, String channel) throws Exception;

    ResultVO queryAccount(String businessId, String idType, String channel, String balanceAccountType);

    UserBo queryAccountByBusinessId(String businessId, String idType, String channel) throws PaymentException;

    /**
     * 创建合规账户
     * @param userDto
     * @param idType
     * @return
     */
    public ResultVO createAccount(UserDto userDto, String idType, String createType, String channel) throws Exception;
    /**
     * 合规账户在支付平台注册id
     * @param accountDto
     * @return
     * @throws Exception
     */
    public ResultVO<String> createCPEAccount(AccountDto accountDto) throws Exception;

    String createOrUpdateThirdUserId(ThirdUserInfo thirdUserInfo, String userId, String type) throws PaymentException;

    String createThirdUserId(String userId, String type, String userType, String settleBank, String customerType) throws PaymentException;

    String getThirdUserIdByUserId(String userId, String channel) throws PaymentException;

    /**
     * 预存用户图片接口
     * @param multipartFiles
     * @param type
     * @param accountId
     * @return
     */
    public ResultVO uploadImg(MultipartFile[] multipartFiles, List<String> type, String accountId) throws Exception;

    boolean isValidPersonalEnumParam(PersonalAccountVo personalAccountVo);

    boolean isValidMerchantEnumParam(MerchantAccountVo merchantAccountVo);

    void UserInfoPicChange(String accountId, Map<String, String> picMap) throws Exception;

    void sendActiveCodeByPhoneNum(ActiveCodeDto activeCodeDto) throws PaymentException;

    void personalSettleCardReBind(PersonalCardBindDto personalCardBindDto) throws PaymentException;

    Integer merchantSettleCardReBind(MerchantCardBindDto merchantCardBindDto) throws PaymentException;
}
